<template>
  <div class="check">
    <div class="check-month">
      <!-- 月份选择 -->
      <a-row>
        <a-col span="18">
          <span class="month-sel" style="margin-left:0;">月份选择</span>
          <a-radio-group defaultValue="a" buttonStyle="solid">
            <a-radio-button value="a">本月</a-radio-button>
            <a-radio-button value="b">上月</a-radio-button>
            <a-radio-button value="c">自定义</a-radio-button>
          </a-radio-group>
          <!-- 点击选择月份 -->
          <a-month-picker :disabledDate="disabledDate" placeholder="点击选择月份" />
          <span class="month-sel">对账起止时间节点选择</span>
          <a-time-picker :defaultValue="moment('12:08', 'HH:mm')" format="HH:mm" />
        </a-col>
        <a-col span="6" style="text-align:right;">
          <a-button type="primary">开始统计</a-button>
        </a-col>
      </a-row>
    </div>
    <!-- 账户总收入 -->
    <div class="account">
      <div class="income">
        <div class="time">
          <div>2019年10月</div>
        </div>
        <div class="account-type">
          <!-- 列表开始 -->
          <div class="list">
            <div class="title">账户总收入</div>
            <div class="price"> <span>+140,183.52</span> 元 </div>
            <div class="num">23 笔</div>
          </div>
          <div class="list">
            <div class="title">账户总支出</div>
            <div class="price" style="color:#FF2C49;"> <span>-140,183.52</span> 元 </div>
            <div class="num">46 笔</div>
          </div>
          <div class="list">
            <div class="title">支付宝总收入</div>
            <div class="price"> <span>+140,183.52</span> 元 </div>
            <div class="num">46 笔</div>
          </div>
          <div class="list">
            <div class="title">微信总收入</div>
            <div class="price"> <span>+17,183.52</span> 元 </div>
            <div class="num">46 笔</div>
          </div>
          <div class="list">
            <div class="title">银联总收入</div>
            <div class="price" style="color:#333333;"> <span>0.00</span> 元 </div>
            <div class="num">0 笔</div>
          </div>
        </div>
        <div class="down-file">
          <div class="long-time">对账起止时间节点 <span>02:00</span></div>
          <div class="done">下载月度汇总</div>
        </div>
      </div>
    </div>
    <!-- 收入明细 -->
    <div>
      <a-row :gutter="10">
        <a-col class="gutter-row" :span="5" >
          <div class="date-sel">
            <div class="gutter-box box_shadow">
              <div style="width:100%;border-radius:5px;height:348px;">
                <a-calendar :locale="{name: 2}" :fullscreen="false"  @panelChange="onPanelChange" />
              </div>
            </div>
            <div class="generate box_shadow">
              生成明细
            </div>
          </div>
        </a-col>
        <a-col class="gutter-row" :span="13">
          <div class="gutter-box">
            <a-card title="收入明细" :bordered="false" class="box_shadow">
              <span slot="extra" style="color:#666666;">2019-10-04 02:00:00 至 2019-10-06 01:59:59</span>
              <div class="card-content">
                <div class="card-img" >
                  <div>
                    <img src="@/assets/imgs/ic_appmanage_alipay.png" alt="">
                    <div class="name">支付宝</div>
                  </div>
                </div>
                <div class="list-w">
                  <div class="title">应收金额</div>
                  <div class="price yb">+800.00</div>
                  <div class="title segment">交易笔数</div>
                  <div class="percentage">42 <span>笔</span></div>
                </div>
                <div class="list-w">
                  <div class="title">优惠金额</div>
                  <div class="price yb">0 元</div>
                  <div class="title segment">收款笔数</div>
                  <div class="percentage">42 <span>笔</span></div>
                </div>
                <div class="list-w">
                  <div class="title">实收金额</div>
                  <div class="price yb">880 元</div>
                  <div class="title segment">退款笔数</div>
                  <div class="percentage">42 <span>笔</span></div>
                </div>
                <div class="list-w">
                  <div class="title">手续费</div>
                  <div class="price yb">0 元</div>
                </div>
                <div class="list-w">
                  <div class="title">实际到账</div>
                  <div class="price yb">+795.20 元</div>
                </div>
              </div>
              <div class="card-content">
                <div class="card-img" >
                  <div>
                    <img src="@/assets/imgs/ic_appmanage_wechatpay.png" alt="">
                    <div class="name">微信</div>
                  </div>
                </div>
                <div class="list-w">
                  <div class="title">应收金额</div>
                  <div class="price yb">+800.00</div>
                  <div class="title segment">交易笔数</div>
                  <div class="percentage">42 <span>笔</span></div>
                </div>
                <div class="list-w">
                  <div class="title">优惠金额</div>
                  <div class="price yb">0 元</div>
                  <div class="title segment">收款笔数</div>
                  <div class="percentage">42 <span>笔</span></div>
                </div>
                <div class="list-w">
                  <div class="title">实收金额</div>
                  <div class="price yb">880 元</div>
                  <div class="title segment">退款笔数</div>
                  <div class="percentage">42 <span>笔</span></div>
                </div>
                <div class="list-w">
                  <div class="title">手续费</div>
                  <div class="price yb">0 元</div>
                </div>
                <div class="list-w">
                  <div class="title">实际到账</div>
                  <div class="price yb">+795.20 元</div>
                </div>
              </div>
              <div class="card-content" style="border:none;">
                <div class="card-img" >
                  <div>
                    <img src="@/assets/imgs/ic_appmanage_unionpay.png" alt="">
                    <div class="name">银联</div>
                  </div>
                </div>
                <div class="list-w">
                  <div class="title">应收金额</div>
                  <div class="price yb">+800.00</div>
                  <div class="title segment">交易笔数</div>
                  <div class="percentage">42 <span>笔</span></div>
                </div>
                <div class="list-w">
                  <div class="title">优惠金额</div>
                  <div class="price yb">0 元</div>
                  <div class="title segment">收款笔数</div>
                  <div class="percentage">42 <span>笔</span></div>
                </div>
                <div class="list-w">
                  <div class="title">实收金额</div>
                  <div class="price yb">880 元</div>
                  <div class="title segment">退款笔数</div>
                  <div class="percentage">42 <span>笔</span></div>
                </div>
                <div class="list-w">
                  <div class="title">手续费</div>
                  <div class="price yb">0 元</div>
                </div>
                <div class="list-w">
                  <div class="title">实际到账</div>
                  <div class="price yb">+795.20 元</div>
                </div>
              </div>
            </a-card>
          </div>
        </a-col>
        <a-col class="gutter-row" :span="6">
          <div class="gutter-box">
            <a-card 
              title="请选择需要下载的对账单明细" 
              class="box_shadow" 
              :bordered="false" 
              style="width: 100%;height:424px;position: relative;"
            >
              <div class="billing">
                <a-radio-group @change="onChange" v-model="value">
                  <a-radio :style="radioStyle" :value="1">支付宝对账单</a-radio>
                  <a-radio :style="radioStyle" :value="2">微信对账单</a-radio>
                  <a-radio :style="radioStyle" :value="3">银联对账单</a-radio>
                </a-radio-group>
             </div>
              <div class="billing-btn">
                  <a-button type="primary">下载对账单明细</a-button>
              </div>
            </a-card>
          </div>
        </a-col>
      </a-row>
    </div>
  </div>
</template>
<script>
import moment from 'moment';
export default {
  data () {
    return {
      value: 1,
      radioStyle: {
        display: 'block',
        height: '40px',
        lineHeight: '40px',
      },
    }
  },
  methods: {
    moment,
    disabledDate(current) {
      // Can not select days before today and today
      window.console.log(current)
      // return current && current < moment().endOf('day');
    },
    onPanelChange(value, mode) {
      window.console.log(value, mode);
    },
     onChange (e) {
      window.console.log('radio checked', e.target.value)
    },
  }
}
</script>
<style lang="less" scoped>
/deep/ .ant-radio-button-wrapper {
  margin-right: 10px;
  border-radius: 3px;
}
/deep/ .ant-row > div {
  background: transparent;
  border: 0;
}
/deep/ .ant-card-body {
  padding: 0 30px;
}
/deep/ .ant-card-head-title {
  font-weight: 600;
}
/deep/ .ant-fullcalendar-header {
  padding: 15px 16px 16px 0;
}
/deep/ .ant-fullcalendar-calendar-body {
  padding-top: 19px;
}
.gutter-row {
  // border-radius: 5px;
}
.gutter-box {
  background: #ffffff;
  border-radius: 5px;
}
.date-sel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 424px;
}
.generate {
  background: #ffffff;
  // margin-top: 10px;
  height: 66px;
  line-height: 66px;
  text-align: center;
  color: #358CF0;
  font-size: 16px;
  font-weight: 600;
  // width: 100%;
}
.check {
  color: #333333;
  &-month {
    padding: 20px;
    background: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.06);
    // @media screen and (max-width: 1900px){
    //   background: red;
    //   font-size: 12px;
    // }
  }
  .month-sel {
    margin:0 20px 0 50px;
    // @media screen and (max-width: 1900px){
    //   margin:0 10px 0 20px;
    // }
  }
  .account {
    margin: 10px 0;
    background: #ECF6FD;
    border-radius: 5px;
    .income {
      display: flex;
      justify-content: space-between;
    }
    .time {
      text-align: center;
      padding: 25px 0;
      div {
        border-right: 1px solid #E7E7E7;
        padding: 25px 39px 25px 50px;
        font-size: 18px;
      }
    }
    .account-type {
      flex: 1;
      display: flex;      
      .list {
        margin-left: 75px;
        padding: 26px 0;
        .title {
          font-size: 16px;
          font-weight: 600;
        }
        .price {
          color: #2FC87A;
          span {
            font-size: 22px;
          }
        }
        .num {
          color: #666666;
          font-size: 12px;
        }
      }
    }
    .down-file {
      position: relative;
      margin-right: 30px;
      .long-time {
        margin-top: 10px;
        font-size: 12px;
        color: #666666;
        span {
          color: #F75800;
        }
      }
      .done {
        position: absolute;
        bottom: 15px;
        right: 0;
        color: #358EE9;
      }
    }
  }
}
.box_shadow {
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}
.card-content {
  display: flex;
  color: #333333;
  padding: 18px 80px 18px 0;
  border-bottom: 1px solid #EBEEF5;
  justify-content: space-between;
  .card-img {
    display: flex;
    align-items: center;
    width: 45px;
    text-align: center;
    .name {
      color: #666666;
    }
    img {
      width: 45px;
      height: 45px;
    }
  }
  .list-w {
    width: 100px;
    height: 86px;
    .title {
      font-size: 14px;
      color: #999999;
    }
    .yb {
      color: #2FC87A;
    }
    .percentage {
      font-size: 16px;
      span {
        font-size: 10px;
      }
    }
    .segment {
      margin-top: 6px;
    }
  }
}
.billing {
  padding: 20px 0;
  &-btn {
    position: absolute;
    right: 20px;
    bottom: 20px;
  }
}
</style>